<extend name="Base/list" />

<block name="title"><if condition="CONTROLLER_NAME=='Order'">订单管理<else/>订单回收站</if></block>
<block name="basecss"><link rel="stylesheet" type="text/css" href="__CSS__/Order.css"></block>
<block name="head"><link rel="stylesheet" type="text/css" href="__PUBLICJS__/EasyUI/themes/default/easyui.css"></block>

<block name="nav">
<li class="current"><a href="{:U(CONTROLLER_NAME.'/index')}">列表</a></li>
<if condition="CONTROLLER_NAME=='Order'">
<li><a href="{:U(CONTROLLER_NAME.'/add')}">添加</a></li>
<li><a href="{:U(CONTROLLER_NAME.'/multi')}">批量修改物流</a></li>
</if>
</block>

<block name="search"></block>

<block name="tip">
<table id="tip">
  <tr><th colspan="2">技巧提示</th></tr>
  <tr><td class="num">1、</td><td>列表中的详细地址默认显示25个字符（1个汉字表示2个字符），鼠标悬停在地址上，将显示地址的全部内容；</td></tr>
  <tr><td class="num">2、</td><td>鼠标悬停在订单IP上，将显示此IP的地理位置；悬停在订单来路上，将显示来路的URL；</td></tr>
  <tr><td class="num">3、</td><td>点击物流编号可查询物流进度。</td></tr>
</table>
</block>

<block name="tools">
<div id="tools">
  <include file="Order/search" />
  
  <h3>批量操作</h3>
  <form method="post" action="" id="form">
    <input type="hidden" name="ids">
    <p><label><input type="radio" name="type" value="0" checked>导出当前所有订单</label> <label><input type="radio" name="type" value="1">导出选定订单</label> <if condition="CONTROLLER_NAME=='Order'"><label><input type="radio" name="type" value="2">删除选定订单</label><else/><label><input type="radio" name="type" value="3">还原选定订单</label> <label><input type="radio" name="type" value="4">删除选定订单</label></if> <label><input type="radio" name="type" value="5">修改订单状态：<select name="state" class="select" style="width:150px;">{$Ostate}</select></label> <input type="submit" value="确认操作" class="btn btn-primary radius"></p>
  </form>
</div>
</block>

<block name="list">
<if condition="$All">
{$page}
<div id="list">
  <table>
    <tr><th class="all"><label><input type="checkbox" class="all">全选</label></th><th class="oid">订单号</th><th class="admin">下单管理员</th><th class="template">下单模板</th><th class="name">姓名</th><th class="pro">订购产品</th><th class="price">成交单价</th><th class="count">订购数量</th><th class="total">成交总价</th><th class="tel">联系电话</th><th class="address">详细地址</th><th class="post">邮政编码</th><th class="email">电子邮箱</th><th class="ip">下单IP</th><th class="referrer">下单来路</th><th class="date">下单时间</th><th class="pay">支付状态</th><th class="state">订单状态</th><th class="logistics">物流信息</th><th class="control">操作</th></tr>
    <foreach name="All" key="key" item="value">
    <tr><td><input type="checkbox" name="id" value="{$value['id']}"></td><td>{$value['oid']|keyword=$keyword}</td><td>{$value['admin']}</td><td>{$value['template']}</td><td>{$value['name']|keyword=$keyword}</td><td>{$value['pro']}</td><td>{$value['price']}元</td><td>{$value['count']}</td><td>{$value['total']}元</td><td>{$value['tel']|keyword=$keyword}</td><td title="{$value['address']}">{$value['address']|truncate=0,25|keyword=$keyword}</td><td>{$value['post']|keyword=$keyword}</td><td>{$value['email']|keyword=$keyword}</td><td title="{$value['ipaddr']}">{$value['ip']|keyword=$keyword}</td><td><if condition="$value['referrer']"><a href="{$value['referrer']}" target="_blank" title="{$value['referrer']}">来路</a><else/>直接进入</if></td><td>{$value['date']|dateFormat}</td><td>{$Pay[$value['pay']]}</td><td>{$value['state']}</td><td>{$value['loginame']}<br><a href="http://www.kuaidi100.com/chaxun?com={$value['logicode']}&nu={$value['logistics_id']}" target="_blank">{$value['logistics_id']|keyword=$keyword}</a></td><td><a href="{:U(CONTROLLER_NAME.'/detail',array('id'=>$value['id']))}">详情</a>/<a href="{:U(CONTROLLER_NAME.'/update',array('id'=>$value['id'],'from'=>0))}">修改</a>/<if condition="CONTROLLER_NAME=='Order'"><a href="{:U(CONTROLLER_NAME.'/recycle',array('id'=>$value['id']))}">删除</a><else/><a href="{:U(CONTROLLER_NAME.'/recover',array('id'=>$value['id']))}">还原</a>/<a href="{:U(CONTROLLER_NAME.'/delete',array('id'=>$value['id']))}">删除</a></if></td></tr>
     </foreach>
  </table>
</div>
{$page}
<else/>
<p id="nothing">没有找到您搜索的订单</p>
</if>

<script type="text/javascript" src="__PUBLICJS__/EasyUI/jquery.easyui.min.js"></script>
<script type="text/javascript" src="__PUBLICJS__/EasyUI/locale/easyui-lang-zh_CN.js" ></script>
<script type="text/javascript" src="__JS__/Order.js"></script>
</block>